package registryx

import (
	"time"

	"github.com/cloudwego/hertz/pkg/app/server/registry"
	"github.com/hertz-contrib/registry/etcd"
)

func RegistryEtcd() registry.Registry {
	r, err := etcd.NewEtcdRegistry(
		[]string{"192.168.20.5:2379"},
		etcd.WithObserveDelay(20*time.Second),
	) //etcd.WithTLSOpt(certFile, keyFile, caFile),
	if err != nil {
		panic(err)
	}
	return r
}
